#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2024/3/8 17:09
# @Author  : jeff
# @FileName: public_controller
# @Software: 主要是进行资产的探测处理
from flask import Blueprint

from src.service.asset_service import AssetService
from src.vo.response import response

asset = Blueprint('asset', __name__, url_prefix='/scan')


class AssetCommon(object):
    @staticmethod
    @asset.route('/asset/taskAdd', methods=['POST'])
    def task_add():
        """
        进行资产扫描任务的探测
        :return:
        """
        return response(AssetService.task_add())

    @staticmethod
    @asset.route('/web/getWebInfo', methods=['POST'])
    def get_web_info():
        """
        进行资产扫描任务的探测
        :return:
        """
        return response(AssetService.get_web_info())
